package com.czh.rdm

data class Person(val name: String, val age: Int? = null)

fun main() {
    val persons = listOf(Person("Alice"), Person("Bob", 31))
    val maxAgePerson = persons.maxBy { it.age ?: 0 }
    println(maxAgePerson)
}